{extend name="ashippingmanagement3/Public/base" /}
{block name="container"}
<div class="page-heade">
    <h1 class="title_color">网点零售数据查询</h1>
</div>
<!-- 标题 -->
<div class="row-margin-top">
    <form id="form_id" action=""  class="form-inline" method="post">
        <table class="row-margin-top tab-content table-bordered  table" border="1">
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点名称</label></td>
                <td><input type="text" class="form-control" name="b.title" value="<?php if(isset($where['b_title'])) echo $where['b_title']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">导购人员</label></td>
                <td><input type="text" class="form-control" name="d.em_name" value="<?php if(isset($where['d_em_name'])) echo $where['d_em_name']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">品牌</label></td>
                <td><input type="text" class="form-control" name="l.brand_name" value="<?php if(isset($where['l_brand_name'])) echo $where['l_brand_name']; ?>"></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">品类</label></td>
                <td><input type="text" class="form-control" name="k.category_name" value="<?php if(isset($where['k_category_name'])) echo $where['k_category_name']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">系列</label></td>
                <td><input type="text" class="form-control" name="j.series_name" value="<?php if(isset($where['j_series_name'])) echo $where['j_series_name']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">SKU</label></td>
                <td><input type="text" class="form-control" name="i.sku_name" value="<?php if(isset($where['i_sku_name'])) echo $where['i_sku_name']; ?>"></td>
            </tr>
            <tr>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">产品编码</label></td>
                <td><input type="text" class="form-control" name="c.pro_no" value="<?php if(isset($where['c_pro_no'])) echo $where['c_pro_no']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">产品名称</label></td>
                <td><input type="text" class="form-control" name="c.pro_name" value="<?php if(isset($where['c_pro_name'])) echo $where['c_pro_name']; ?>"></td>
                <td style="min-width: 120px;width: 120px"><label for="" class="form-label">日期</label></td>
                <td>
                    <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date validate[custom[dateFormat]]" style="width: 120px;min-width: 120px; display: inline-block;" name="a.wdDate" value="<?php if(isset($where['a_wdDate'])) echo $where['a_wdDate']; ?>">
                    </div>
                    <div class="form-group">
                        至
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date validate[custom[dateFormat]]" style="width: 120px;min-width: 120px;display: inline-block;" id="end" name="a.wdDate1" value="<?php if(isset($where['a_wdDate1'])) echo $where['a_wdDate1']; ?>">
                    </div>
                </td>

            </tr>
            <tr>
                <td colspan="6" class="text-center">
                    <button class="btn btn-info query" type="submit">查询</button>
                    <button class="btn btn-info emptyIf" type="submit" onclick="$('#form_id').find('input').val('');">清空查询条件</button>
                    <button class="btn btn-info emptyIf" type="button" onclick='window.open("/index/Ashippingmanagement3/export","_self")'>导出Excel</button>
                </td>
            </tr>
        </table>
        <table class="table table-bordered table-hover text-center" id="verifytable">
            <tr class="info text-center">
                <th rowspan="2" style="min-width: 60px;width: 60px" class="text-center">序号</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">日期</th>
                <th colspan="4" class="text-center">网点信息</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">导购人数</th>
                <th colspan="6" class="text-center">产品信息</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">单价(元)</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">数量</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">单位</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">金额(元)</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">批号/批次</th>
                <th rowspan="2" style="min-width: 140px;width: 140px" class="text-center">备注</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">导购人员</th>
                <th rowspan="2" style="min-width: 100px;width: 100px" class="text-center">录入人</th>
                <th rowspan="2" style="min-width: 120px;width: 120px" class="text-center">录入时间</th>
                <th colspan="2" class="text-center">网点所属渠道</th>
                <th colspan="9" class="text-center">网点所属情况</th>
                <th colspan="6" class="text-center">网点所属负责人</th>
                <th rowspan="2" style="min-width: 180px;width: 180px" class="text-center">操作</th>
            </tr>
            <tr class="info">
                <th style="min-width: 100px" class="text-center">网点编号</th>
                <th style="min-width: 200px" class="text-center">网点名称</th>
                <th style="min-width: 140px" class="text-center">系统自编店号</th>
                <th style="min-width: 100px" class="text-center">是否直营</th>
                <th style="min-width: 100px" class="text-center">品牌</th>
                <th style="min-width: 100px" class="text-center">品类</th>
                <th style="min-width: 100px" class="text-center">系列</th>
                <th style="min-width: 100px" class="text-center">SKU</th>
                <th style="min-width: 100px" class="text-center">产品编码</th>
                <th style="min-width: 100px" class="text-center">产品名称</th>
                <th style="min-width: 100px" class="text-center">一级渠道</th>
                <th style="min-width: 100px" class="text-center">二级渠道</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>行政省份</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>行政城市</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>营销分区</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>营销省份</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>营销城市</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>经销商编号</th>
                <th style="min-width: 220px" class="text-center">网点所属<br>经销商</th>
                <th style="min-width: 120px" class="text-center">网点所属<br>系统编号</th>
                <th style="min-width: 220px" class="text-center">网点所属<br>系统</th>
                <th style="min-width: 120px" class="text-center">分区经理</th>
                <th style="min-width: 120px" class="text-center">省份经理</th>
                <th style="min-width: 120px" class="text-center">城市经理</th>
                <th style="min-width: 120px" class="text-center">经销商负责人</th>
                <th style="min-width: 120px" class="text-center">系统负责人</th>
                <th style="min-width: 120px" class="text-center">网点负责人</th>
            </tr>
            <tbody>
            {volist name="data" id="list"}
            <tr>
                <td>{$i}</td>
                <td>{$list.wdDate}</td>
                <td>{$list.sn}</td>
                <td>{$list.title}</td>
                <td>{$list.mysn}</td>
                <td>{$list.direct}</td>
                <td>{$list.em_num}</td><!--导购人数-->
                <td>{$list.brand_name}</td>
                <td>{$list.category_name}</td>
                <td>{$list.series_name}</td>
                <td>{$list.sku_name}</td>
                <td>{$list.pro_no}</td>
                <td>{$list.pro_name}</td><!--产品名称-->
                <td class="ObjectNum">{$list.dj}</td>
                <td>{$list.num}</td>
                <td>{$list.dw}</td>
                <td class="ObjectNum">{$list.money}</td>
                <td>{$list.phpc}</td>
                <td>{$list.des}</td>
                <td>{$list.dgUser1}</td>
                <td>{$list.lrUser}</td>
                <td>{$list.lrDate}</td>
                <td>{$list.yj}</td><!--一级渠道-->
                <td>{$list.ej}</td>
                <td>{$list.s}</td><!--行政省-->
                <td>{$list.shi}</td>
                <td>{$list.yq}</td>
                <td>{$list.yshi}</td>
                <td>{$list.ys}</td>
                <td>{$list.jxs}</td>
                <td>{$list.jxs_no}</td>
                <td>{$list.xt}</td>
                <td>{$list.xt_no}</td>
                <td>{$list.pr}</td>
                <td>{$list.nr}</td>
                <td>{$list.ab}</td>
                <td>{$list.jxsfz}</td>
                <td>{$list.wdfz}</td>
                <td>{$list.xtfz}</td>
                <td><a href="{:url('Ashippingmanagement3/infoP')}?id={$list.id}" class="stair_modify" >查看</a>
            </tr>
            {/volist}
            </tbody>
            <tfoot>
            <tr class="trTotal font-bold">
                <td colspan="5"></td>
                <td class="text-center">合计</td>
                <td>{$tmp.em_num}</td>
                <td colspan="7"></td>
                <td>{$tmp.num}</td>
                <td></td>
                <td class="ObjectNum">{$tmp.money}</td>
                <td colspan="21"></td>
            </tr>
            </tfoot>
        </table>
        <h5 class="text-center">
            总共有{$count}条记录，第{$page}/{$maxpage}页，当前页：<input id="page" name="pages" type="text" style="width: 70px;" value="" class="form-control" />
            <button id="gopage" type="submit" style="height: 23px;">GO</button>&nbsp;&nbsp;<button id="fistpage" type="submit" onclick="$('#form_id').find('input').val('');" style="height: 23px;">首页</button>&nbsp;&nbsp; 每页显示
            <select id="pagesize" style="width: 70px" class="form-control select" name="limts">
                <option value='1'>1</option>
                <option value='5'>5</option>
                <option value='10'>10</option>
            </select>条
            <script>
                $('#pagesize').val("{$limit}");
            </script>
        </h5>
    </form>
</div>
<script>
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    $(document).ready(function(){
        // $("#verifytable tbody tr td").find('.duigou')
        /*格式化数字金额*/
        var $ObjectNum =$(".ObjectNum");
        toNum($ObjectNum);
        /*为已生效的核销申请字体加粗*/
    })
</script>
{/block}
